package com.lock.lock_common.api.productApi;

import com.github.pagehelper.PageInfo;
import com.lock.lock_common.dto.Result;
import com.lock.lock_common.pojo.ProductImages;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

public interface ProductImagesApi {
    //商品图片分页（参数：商品id）
    @RequestMapping("/imagesPaging")
    Result<PageInfo<ProductImages>> imagesPaging(@RequestBody Map<String, Object> map);

    //按条件查找商品图片（参数：商品id,图片类型）
    @RequestMapping("/selectImagesByProductId")
    Result<List<ProductImages>> selectImagesByProductId(@RequestBody Map<String, Object> map);


    //添加图片
    @RequestMapping("/addImages")
    Result<Integer> addImages(@RequestBody ProductImages images);

    //修改图片
    @RequestMapping("/updImages")
    Result<Integer> updImages(@RequestBody ProductImages images);

    //删除图片
    @RequestMapping("/delImages")
    Result<Integer> delImages(@RequestParam Integer imagesId);

}
